home *** CD-ROM | disk | FTP | other *** search
- Path: news.cyberport.com!usenet
- From: tangent@cyberport.com (Warren Young)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: Wed, 10 Jan 1996 08:42:45 GMT
- Organization: ETR..., Inc.
- Message-ID: <4cvu68$2jb@macaw.cyberport.com>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd <4cf8hf$8fe@hopi.gate.net> <4cgq30$c0v@weck.brokersys.com>
- NNTP-Posting-Host: ppp11.cyberport.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- jguthrie@brokersys.com wrote:
-
- >It hurts because you have to keep track of the type independantly of the
- >actual type declaration. Having to maintain that information in two places
- >means that it won't ever get done. When you change the type of a variable,
- >(and this IS done from time to time even after primary coding is finished,)
- >not only do you have to change the declaration, but also all the places where
- >that variable appears ....
-
- This is one of the reasons HN is useful. By forcing the programmer to
- visit every place that the variable is used, the programmer has an
- opportunity to check the semantics of the variable's use. If the type
- of the variable has changed, chances are that the semantics have
- changed as well. How many times have you changed a variable's type to
- fix something, only to break something else?
-
- >....no matter where it is or the information it gives you
- >is wrong. Comments that lie are far worse than no comments at all. The
-
- Of course, and part of the assumption that goes along with HN is that
- the programmer is disciplined enough to change the variable name when
- the declaration changes. If you care enough about type errors to fix
- it with HN, this assumption is probably correct. Yes, there are
- plenty of people who use HN blindly, and this is unfortunate, but
- that's life.
-
- >only description of what the code DOES is in the code itself, the comments
- >(and other semantically insignificant clues in the program) should describe
- >what the program is trying to accomplish, not how it accomplishes it.
-
- This is true for comments, because they are logically at a higher
- level of abstraction than the rest of the program. HN works at the
- code level, however. The only time you actually use the information
- in the HN prefixes is when you're working with the code itself.
-
- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- Warren Young <tangent@cyberport.com> WAS tkennedy@...!
-
-